home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / tutor / advtutr.exe / ADVENT1.DOC < prev    next >
Text File  |  1986-02-14  |  7KB  |  125 lines

  1.                      How to write an Adventure
  2.  
  3.      It seems to me that there have got to be others out there in modem ì
  4. country who have adventure running around in their heads.  If you are like me, ì
  5. you are brimming over with plots, and just can't fathom how to code them. ì
  6. Well, since I started writing adventures in 1981, I've learned alot about how ì
  7. to code.  In the this series of files (and it may take a few days for them to 
  8. all appear) we'll demonstrate how to make the computer understand our input ì
  9. and act out the adventure.  The coding is coing to be "plain vanilla"... ì
  10. nothing fancy with the screen or machine specific.  Just code that will create ì
  11. an adventure, and which will be easily transportable from machine to machine.  
  12.  
  13.  
  14. Some conventions in Adventuring
  15.  
  16.      An adventure is a hybrid sort of program.  It is a semi-intelligent ì
  17. word-recognition program which takes simple english commands and acts upon ì
  18. them, updating some sort of situation display in the process.  The point of an ì
  19. adventure is almost always a puzzle. The puzzle may be escape from an ì
  20. unpleasant fate or surrounding, or the gathering of treasure or other prizes.  
  21.      What all adventures have in common are some basic concepts, and some ì
  22. basic parts.  
  23.      The first part of the adventure is the situation display.  This may take ì
  24. the form of a simple display that says: 
  25.  
  26.      YOU SEE: A GRASSY MEADOW
  27.      VISABLE OBJECTS: A TALL OAK TREE
  28.      YOU CAN GO: N,S,E,W,U
  29.  
  30.      This is the format made popular by Scott Adams, and most adventurers ì
  31. have, at one time or another seen this style display. It is easy to code, and ì
  32. easy for the player to understand.  A little harder to code is the interactive ì
  33. fiction/text adventure. The same display above would read like this: 
  34.      YOU ARE IN A GRASSY MEADOW. THERE IS A TALL OAK TREE NEARBY. YOU CAN GO ì
  35. NORTH, EAST, SOUTH, OR WEST, AND THE TREE LOOKS CLIMBABLE.  
  36.      This is tougher to code, and unless there is interest in examples of it, ì
  37. we probably are not going to go into it here.  
  38.      The second part of the adventure is the command parser. It begins with a ì
  39. prompt asking for user input (ex: WHAT WOULD YOU LIKE TO DO?).  After ì
  40. accepting the user input, the parser does a number of things.  
  41.      1. It checks to see if there are two words present.
  42.      2. If only one word is present, it diverts the flow of the program to the ì
  43. single word recognition list.  
  44.      3. If two words are present, it divides the input string into two parts, ì
  45. and passes the parts to the command interpreter.  
  46.      The Command interpreter is the third and most complex part of the ì
  47. adventure. It is usually organized along these lines: 
  48.      First, the verb is evaluated. If a good verb (understood by the program) ì
  49. control is passed to a set of lines in the code designed to deal with that ì
  50. verb.  
  51.      Second, the noun is evaluated. If the noun is one recognized as having ì
  52. meaning in the context of the verb, action takes place. If not, then a message ì
  53. is printed indicating that the input is meaningless.  
  54.      
  55. Pre-planning
  56.  
  57.      As with anything else, an adventure requires alot of pre-planning.  You ì
  58. cannot just sit down at the keyboard and hack one out.  I believe my record ì
  59. for putting one together is eight days (and that was a simple to code one --- ì
  60. RADIO.BAS here).  There is alot of planning that must happen first.  
  61.      For instance:
  62.      PLOT: The basic plot and assumptions of the adventure must be set in your ì
  63. mind longh before you hit the first key. Where will the adventure take place? ì
  64. What time period? Is it technological or mythical (does magic work) ? What is ì
  65. the goal (escape, rescue, gathering treasure, solving a mystery)? The thematic ì
  66. considerations are going to dictate alot of what you do with the story. It is ì
  67. generally a bad idea to mix magic and high tech science. That is to say, a ì
  68. space-opera should not incorporate magic, because of the old axiom that "if ì
  69. magic works, there is no need to generate high tech science. Use magic to ì
  70. solve all of your problems" (STAR WARS not withstanding).  
  71.      MAPPING: Once you have the plot in mind, the next step is to generate ì
  72. your move map.  This is a sheet where you draw out all of the rooms ì
  73. (locations) of the adventure. They should be laid out on the sheet in their ì
  74. true relationships. Once you've done this, and labeled all the rooms as to ì
  75. what they are, you then should draw lines from one box to the other showing ì
  76. the connections... that is, where does room "A" goto to the North, to the ì
  77. east...etc. This will greatly facilitate the keyboard job of mapping the ì
  78. adventure.  
  79.      Once you do all of this, NUMBER the rooms from 1 to however many you ì
  80. have.  
  81.      FILLING THE ROOMS: Now comes the fun part. Each room of your maze has a ì
  82. specific part to play in your story. It may be a colorful backdrop to make the ì
  83. story seem more real, or it may be the initial location of an object that is ì
  84. needed by the story. It also may contain object(s) that have absolutely ì
  85. NOTHING to do with solving the puzzle. They, again, may be just for color and ì
  86. believability, or they may be "red herrings" to distract the unsuspecting ì
  87. player.  
  88.      Go through each room on your map, and write a description of the room ì
  89. that will be displayed when the player enters the room, and make a list of the ì
  90. items that will be found in the room. Don't go overboard...  the more items ì
  91. the slower your parser is going to run. A total of 100 objects for the ì
  92. adventure is TONS... as few as 20 can make a good adventure. If there are ì
  93. objects that you don't want the player to have at first (for instance stuff ì
  94. that appears magically later) put that in a special room we'll call "ROOM 0".  
  95.      There is just one more job to do before you start plinking the keys and 
  96. hacking code. That is the job of: 
  97.      CREATING THE VOCABULARY: That's right. You have to tell the computer the ì
  98. list of words that the adventure will understand. The noun list is pretty ì
  99. easy. Look at the objects you have placed in your rooms.  Well, you will of ì
  100. course need a different word to identify each object.  
  101.      Eh? You say you had objects with the same names in several rooms?  Well, ì
  102. go back and find other, simular words for the duplicate objects.  That ì
  103. situation CAN be dealt with, but it sure makes the coding harder.  We'll save ì
  104. that for an online siminar in Advanced Adventure Writing.  
  105.      Look at the object list, and write down one word that will describe each ì
  106. object. This is your noun list.  
  107.      Now, add to that list, North, East, South, West, Up and Down.
  108.      In another column, start your verb list. This is a little harder.  
  109.      There are a number of verbs (movement words) that everyone needs in their 
  110. adventures. Words like GO, GET, TAKE, PUT, DROP... in fact, put those at the ì
  111. top of your verb list. You'll need all of them! Think of all of the things ì
  112. people will need to do to your objects in order to solve the adventure. Will ì
  113. they need to "SHOOT GUN"? Then SHOOT must be on your verb list. Continue in ì
  114. this fashion until you feel you have covered all bases. (You'll forget ì
  115. something, but that can be fixed later on... I'll show you how!) 
  116.      You are now ready to hit the keyboard... a subject covered in file 2 of ì
  117. our little story.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.